package com.liruo.learn.spring.mvc.controller.m1model;

import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ModelAttribute;

/**
 * @Author:liruo
 * @Date:2023-10-06-18:28:01
 * @Desc
 */
@ControllerAdvice
public class ModelTestAdvice {

  @ModelAttribute("ma1")
  public String ma1() {
    return "ma1";
  }
  @ModelAttribute
  public String ma2() {
    return "ma2";
  }
  @ModelAttribute
  public void ma3(Model model) {
    model.addAttribute("ma3", "ma3");
  }
}
